Hydra: an Adaptive{mesh Implementation of P 3 M{sph
نویسندگان
چکیده
We present an implementation of Smoothed Particle Hydrodynamics (SPH) in an adaptive-mesh P 3 M algorithm. The code evolves a mixture of purely gravitational particles and gas particles. SPH gas forces are calculated in the standard way from near neighbours. Gravitational forces are calculated using the mesh reenement scheme described by Couchman (1991). The AP 3 M method used in the code gives rise to highly accurate forces. The maximum pairwise force error is set by an input parameter. For a maximum pairwise force error of 7.7%, the rms error in a distribution of particles is 0:3%. The reened{mesh approach signiicantly increases the eeciency with which the neighbour particles required for the SPH forces are located. The code, \Hydra," retains the principal desirable properties of previous P 3 M{SPH implementations; speed under light clustering, naturally periodic boundary conditions and easy control of the accuracy of the pairwise interparticle forces. Under heavy clustering the cycle time of the new code is only 2{3 times slower than for a uniform particle distribution, overcoming the principal disadvantage of previous implementations | a dramatic loss of eeciency as clustering develops. A 1000 step simulation with 65 536 particles (half dark, half gas) runs in one day on a Sun Sparc10 workstation. The choice of time integration scheme is investigated in detail. We nd that a simple single-step Predictor{Corrector type integrator, which is equivalent to Leapfrog for velocity-independent forces, is the most eecient. A method for generating an initial distribution of particles by allowing a a uniform temperature gas of SPH particles to relax within a periodic box is presented. The average SPH density that results varies by 1:3 percent. This is the uctuation amplitude on roughly the Nyquist 1 frequency, for smaller wavenumbers the uctuations have lower amplitude. We present a modiied form of the Layzer{Irvine equation which includes the thermal contribution of the gas together with radiative cooling. The SPH and time integration schemes were tested and compared by running a series of tests of sound waves and shocks. These test were also used to derive timestep constraints suucient to ensure both energy and entropy conservation. We have compared the results of simulations of spherical infall and collapse with varying numbers of particles. We show that many thousands of particles are necessary in a halo to correctly model the collapse. As a further test the cluster simulation of Thomas and Couchman (1992) has …
منابع مشابه
a st ro - p h / 97 03 18 3 v 1 2 7 M ar 1 99 7 Hydra : A Parallel Adaptive Grid Code
We describe the first parallel implementation of an adaptive particle-particle, particle-mesh code with smoothed particle hydrodynamics. Parallelisation of the serial code, " Hydra " , is achieved by using CRAFT, a Cray proprietary language which allows rapid implementation of a serial code on a parallel machine by allowing global addressing of distributed memory. The collisionless variant of t...
متن کاملv 3 7 A pr 1 99 7 Hydra 2 . 0 Documentation
Hydra can be obtained from either of the following websites; Hydra is an adaptive particle-particle, particle-mesh plus smoothed particle hydro-dynamics N-body simulation program. It can be used with either periodic or isolated boundary conditions. A compiler flag allows the gas calculation to be turned off, converting Hydra to a collisionless mode. An installation guide comes with the release ...
متن کاملSmoothed Particle Hydrodynamics in cosmology: a comparative study of implementations
We analyse the performance of twelve different implementations of Smoothed Particle Hydrodynamics (SPH) using seven tests designed to isolate key hydrodynamic elements of cosmological simulations which are known to cause the SPH algorithm problems. In order, we consider a shock tube, spherical adiabatic collapse, cooling flow model, drag, a cosmological simulation, rotating cloud-collapse and d...
متن کاملA parallel adaptive P3M code with hierarchical particle reordering
We discuss the design and implementation of HYDRA OMP a parallel implementation of the Smoothed Particle Hydrodynamics–Adaptive PM (SPH-APM) code HYDRA. The code is designed primarily for conducting cosmological hydrodynamic simulations and is written in Fortran77+OpenMP. A number of optimizations for RISC processors and SMP-NUMA architectures have been implemented, the most important optimizat...
متن کاملNon-Radiative Test of a New SPH Scheme
We adapt new schemes of gravitational N-body dynamics and smoothed particle hydrodynamics (SPH) to the tree N-body/SPH galactic chemodynamics code GCD+. The applied new schemes include the adaptive softening suggested by Price & Monaghan (2007), to improve the self-gravity calculation, and artificial viscosity and thermal conductivity suggested by Rosswog & Price (2007) and Price (2008), to mod...
متن کامل